package part03_工厂模式.p03_工厂方法模式;

/**
 * @ClassName: BJOrderPizza
 * @Author: AllenSun
 * @Date: 2020/3/12 22:56
 */
class BJOrderPizza extends OrderPizza03{

    @Override
    Pizza03 createPizza(String orderType) {
        Pizza03 pizza03=null;
        if(orderType.equals("cheese")){
            pizza03=new BJCheesePizza();
        } else if(orderType.equals("pepper")){
            pizza03=new BJPepperPizza();
        }
        return pizza03;
    }
}
